<script>
	export default {
		globalData: {
			showPrivacy: false,
			onReview: false,
			small_shelves: '1.0.0',
			openid: '',
			wechatuserinfo: '',
			userinfo: '',
			site_url: "",
			site_h5url: "",
			qiniuimageurl: "",
			biaoqingurl: "",
			// #ifdef MP-WEIXIN
			socket_url: "",
			// #endif
			// #ifndef MP-WEIXIN
			socket_url: "",
			// #endif
			sign_key: "",
			grade_class: {
				'id': "",
				'name': ""
			},
			course_class: '',
			emojiArray: [],
			pinyinArray: [],
			login_jump: {
				'page': '',
				'keyword': '',
				'data': {}
			}, //登录后跳转的页面及数据 
			open_shuati_info_num: 0, //打开刷题内页的次数, 用于控制是否显示滑动提示
			open_kaoshi_info_num: 0, //打开考试内页的次数, 用于控制是否显示滑动提示
			//存储考试时 做完的题数据 题id1 : {题号1, 题号2, ...}, 题id2: {....}
			kaoshi_tiend: {}
		},
		onLaunch: function() {
			if (uni.getPrivacySetting) {
				uni.getPrivacySetting({
					success: res => {
						// console.log("是否需要授权：", res.needAuthorization, "隐私协议的名称为：", res.privacyContractName)
						if (res.needAuthorization) {
							getApp().globalData.showPrivacy = true;
						} else {
							getApp().globalData.showPrivacy = false;
						}
					},
					fail: () => {},
					complete: () => {},
				})
			}
			// console.log('App Launch');
			// 检测更新
			this.utilJs.update();
			//检查网络
			this.utilJs.onNetWork();
		},
		onLoad() {

		},
		onShow: function() {
			// console.log( 'show');
			uni.getStorage({
				key: 'userinfo',
				success: function(res) {
					// console.log('APP.vue页面获取缓存成功');
					getApp().globalData.userinfo = res.data;
				}
			});
		},
		onHide: function() {

		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */
	// @import "./common/uni.css";
	/* 自定义图标库 */
	// @import "./common/icon.css";
	/* 动画库 */
	// @import url("./common/animate.css");
	/* 自定义样式库 */
	// @import url("./common/free.css");
	/* 全局样式 */
	@import url("@/common/common.css");
	@import '@/static/icon/iconfont.css';
	/* 自定义图标库 */
	@import "@/common/icon.css";

	page {
		height: 100%;
		background: url('https://www.yplm888.com//uploads/20220803/7ed305f9a93ba50b049a7725662b18cc.png') no-repeat;
		background-size: 100% 500rpx;
	}

	/* 去掉弹出层默认白色背景, 页面样式中设置无效 */
	.uni-transition .uni-popup__wrapper-box {
		background: none !important;
	}

	/* 防止小程序右上角按钮遮住导航右侧按钮 */
	.uni-navbar {
		margin-top: 52rpx !important;
	}

	/deep/.uni-scroll-view ::-webkit-scrollbar {
		/* 隐藏滚动条，但依旧具备可以滚动的功能 */
		display: none;
		width: 0;
		height: 0;
		color: transparent;
		background: transparent;
	}

	/deep/::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
		color: transparent;
		background: transparent;
	}
</style>